# myproject/routing.py
from django.urls import re_path
from apptext01.consumers import ConnectionTestConsumer,ConnectionChatConsumer # 消费者类必须存在

websocket_urlpatterns = [
    re_path(r'^ws/connection-test/$', ConnectionTestConsumer.as_asgi()),
    re_path(r'^ws/chat/(?P<room_id>\w+)/$', ConnectionChatConsumer.as_asgi()),
    #re_path(r'^ws/menu/(?P<type>\w+)/(?P<user_id>\d+)', ConnectionMenuConsumer.as_asgi())
]